define(['axios'],function(axios){
  let opt = {
    data:{
        loading:true,
        loadingDialog:true,
        mainHeight:500,
        row : varTemplate.row
    },
    components:{
      // 'comp-text':resolve=>require(['_vue!pathComponent/comp-text'], resolve),
    },
    methods:{
        handelBeforeLeave(activeName, oldActiveName){
            let obj = this.row.kind[activeName];
            obj.showIframe = true;
            this.$set(this.row.kind , activeName ,obj);
        },
        initHeight(){
          // 处理高度
          this.mainHeight     = (document.documentElement.clientHeight || document.body.clientHeight) - 60;
          this.loading = false;
        }
    },
    mounted(){
      var that = this;
      that.initHeight(); //初始化高度
      this.row.kind.forEach(function(item,index){
        if(index==0){
            item.showIframe = true;
        }else{
            item.showIframe = false;
        }
      });

      window.onresize = function() {
        that.initHeight();
      }
    }
  }
  return opt;
});